package com.sskj.b70.m.bean;

import com.google.gson.annotations.SerializedName;
import com.sskj.b70.utils.NumberUtil;

import java.util.List;

/**
 * ProjectName：（项目名称）
 * DESC: (类描述)
 * Created by 吕志豪 on 2018/04/21 18:48
 * updateName:(吕志豪)
 * updateTime:(18:48)
 * updateDesc:(修改内容)
 */

public class AseetListBean {

    /**
     * asset : []
     * wallone : 0.0000
     */

    public String wallone;
    public List<AseetBean> asset;

    public static class AseetBean {
        public String mark;
        public double usable;
        public double frost;
        public String uptime;
        public int pid;
        @SerializedName(value = "pname", alternate = {"stockCode"})
        public String pname;
        public String id;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getFrostFund() {
            if (pname.endsWith("USDT")) {
                return NumberUtil.keepMax4(frostFund);
            } else {
                return NumberUtil.keepMax(frostFund, 8);
            }
        }

        public void setFrostFund(String frostFund) {
            this.frostFund = frostFund;
        }

        public String getUsableFund() {
            if (pname.endsWith("USDT")) {
                return NumberUtil.keepMax4(usableFund);
            } else {
                return NumberUtil.keepMax(usableFund, 8);
            }
        }

        public void setUsableFund(String usableFund) {
            this.usableFund = usableFund;
        }

        private String frostFund;
        private String usableFund;

    }
}
